package it.koutifaris.travianmap.worldmap;

import it.koutifaris.travianmap.model.MapSquare;

import java.util.HashMap;

public class MapCacheImpl implements MapCache {

	private HashMap<XY, MapSquare> cache;

	public MapCacheImpl() {
		cache = new HashMap<XY, MapSquare>();
	}

	@Override
	public MapSquare getMapSquare(XY coords) {
		return cache.get(coords);
	}

	@Override
	public void setMapSquare(XY coords, MapSquare mapSquare) {
		cache.put(coords, mapSquare);
	}

}
